/**
 * pharma-model - 9 janv. 2011 guillaume
 */
package org.bspv.pharma.model;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Version;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

import org.bspv.pharma.common.constant.Constants;

/**
 * @author guillaume
 */
@Entity
@Table(name = "PACKAGING")
public class Packaging implements Serializable {

    /**
     * serialVersionUID.
     */
    private static final long serialVersionUID = 1L;

    /**
     * Identifiant du conditionnement.
     */
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;
    /**
     * Libellé court du conditionnement.
     */
    @NotNull
    @Size(max = Constants.CONSTRAINT_LABEL_SIZE)
    private String shortLabel;
    /**
     * Libellé long du conditionnement.
     */
    @Size(max = Constants.CONSTRAINT_LONG_LABEL_SIZE)
    private String longLabel;
    /**
     * Date à partir de laquelle le conditionnement est déprécié.
     */
    private Date deprecated;
    /**
     * Date à partir de laquelle le conditionnement est obsolète.
     */
    private Date obsolete;
    /**
     * Commentaire sur ce conditionnement.
     */
    @Size(max = Constants.CONSTRAINT_COMMENT_SIZE)
    private String comment;
    /**
     * Numéro de version.
     */
    @Version
    private Integer version;

    /**
     * @return the id
     */
    public final Long getId() {
        return id;
    }

    /**
     * @param id
     *            the id to set
     */
    public final void setId(final Long id) {
        this.id = id;
    }

    /**
     * @return the shortLabel
     */
    public final String getShortLabel() {
        return shortLabel;
    }

    /**
     * @param shortLabel
     *            the shortLabel to set
     */
    public final void setShortLabel(final String shortLabel) {
        this.shortLabel = shortLabel;
    }

    /**
     * @return the longLabel
     */
    public final String getLongLabel() {
        return longLabel;
    }

    /**
     * @param longLabel
     *            the longLabel to set
     */
    public final void setLongLabel(final String longLabel) {
        this.longLabel = longLabel;
    }

    /**
     * @return the deprecated
     */
    public final Date getDeprecated() {
        return deprecated;
    }

    /**
     * @param deprecated
     *            the deprecated to set
     */
    public final void setDeprecated(final Date deprecated) {
        this.deprecated = deprecated;
    }

    /**
     * @return the obsolete
     */
    public final Date getObsolete() {
        return obsolete;
    }

    /**
     * @param obsolete
     *            the obsolete to set
     */
    public final void setObsolete(final Date obsolete) {
        this.obsolete = obsolete;
    }

    /**
     * @return the comment
     */
    public final String getComment() {
        return comment;
    }

    /**
     * @param comment
     *            the comment to set
     */
    public final void setComment(final String comment) {
        this.comment = comment;
    }

    /**
     * @return the version
     */
    public final Integer getVersion() {
        return version;
    }

    /**
     * @param version
     *            the version to set
     */
    public final void setVersion(final Integer version) {
        this.version = version;
    }

}
